package gui;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.RenderingHints;
import java.awt.Shape;
import java.awt.geom.Ellipse2D;

import javax.swing.JLabel;

/**
 * @author Ramy Refky 
 * */
public class WireIntersectionPoint extends JLabel {
	
	private static final long serialVersionUID = 1L;
	
	Point drawPoint;
	
	/**
	 * Constructor initializes WireIntersectionPoint Class, which is a black dot indicating wire intersections.
	 * @param Point
	 * */
	public WireIntersectionPoint(Point drawPoint){
		this.drawPoint=drawPoint;
		setBounds(drawPoint.x-4,drawPoint.y-2,12,12);
		setOpaque(false);
		setVisible(true);
		repaint();
	}
	public void paint(Graphics g) {
		super.paint(g);
		
		Graphics2D g2 = (Graphics2D)g;
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                             RenderingHints.VALUE_ANTIALIAS_ON);
        
        Shape circle = new Ellipse2D.Float(0,0,12,12);
		g2.fill(circle);
	}
}
